{% extends 'myadmin/index.html' %}

{% block title %}
<title>后台-订单详情</title>
{% endblock %}

{% block sidebar%}

{%endblock%}

{% block con %}
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title  am-cf">订单{{data.id}}详情</div>
                </div>
                <div class="widget-body  am-fr">
                    <div class="am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
                            <thead>
                                <tr>                     
                                    <th>收货人</th>
                                    <th>收货电话</th>
                                    <th>订单总价</th>
                                    <th>下单时间</th>
                                    <th>支付方式</th>
                                    <th>物流方式</th>
                                    <th>状态</th>
                                    <th>收货地址</th>
                                </tr>
                            </thead>
                            <tbody>            
                                <tr>
                                    <td class="am-text-middle">{{ data.buser}}</td>
                                    <td class="am-text-middle">{{ data.buser_phone }}</td>
                                    <td class="am-text-middle">{{ data.totalprice }}</td>
                                    <td class="am-text-middle">{{ data.addtime }}</td>
                                    <td class="am-text-middle">{{ data.payment }}</td>
                                    <td class="am-text-middle">{{ data.logistics }}</td>
                                    <td class="am-text-middle name">{% if data.status == 0 %}未付款{%elif  data.status == 1 %}待发货{%elif  data.status == 2 %}待收货{%elif  data.status == 3 %}待评价{%elif  data.status == 4 %}前台删除{%endif%}</td>
                                    <td class="am-text-middle">{{ data.re_addr }}</td>
                                </tr>
                       
                      
                                <!-- more data -->
                            </tbody>
                        </table>
                        <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
                            <thead>
                                <tr>                     
                                    <th>商品图片</th>
                                    <th>商品</th>
                                    <th>单价</th>
                                    <th>购买数量</th>
                                </tr>
                            </thead>
                            <tbody>   
                                {% for i in data.orderinfo_set.all%}         
                                <tr>
                                    <td class="am-text-middle">
                                        <img src="{{ i.pic_url}}" class="tpl-table-line-img" alt="">
                                    </td>
                                    <td class="am-text-middle">{{ i.name}}</td>
                                    <td class="am-text-middle">{{ i.price }}</td>
                                    <td class="am-text-middle">{{ i.num}}</td>
                                </tr>
                                {% endfor%}
                        
                                <!-- more data -->
                            </tbody>
                        </table>
                    </div>
                    <div class="am-u-lg-12 am-cf">

                        <div class="am-fr">
                            <ul class="am-pagination tpl-pagination">
                                {% load pagetag %}
                              
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

{% endblock %}